import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: { title: "首页", showFooter: true ,keepAlive:false}
  },
  {
    path: '/order',
    name: 'Order',

    component: () => import('../views/Order.vue'),
    meta: { title: "订单", showFooter: true ,keepAlive:false}
  },
  {
    path: '/Map',
    name: 'map',

    component: () => import('../views/Map.vue'),
    meta: { title: "地图", showFooter: false ,keepAlive:false}
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('../views/my.vue'),
    meta: { title: "我的", showFooter: true ,keepAlive:false},
    // children:[
    //   {path:"/agreement",name:'Agreement',component: () => import('../views/agreement.vue'),meta: {title:"协议",showFooter: false}}
    // ]
  },
  { path: "/returncar", name: 'Returncar', component: () => import('../views/returncar.vue'), meta: { title: "归还代步车", showFooter: false,keepAlive:true } },
  { path: "/apply", name: 'Apply', component: () => import('../views/apply.vue'), meta: { title: "申请代步车", showFooter: false,keepAlive:true } },
  { path: "/scan", name: 'Scan', component: () => import('../components/scan.vue'), meta: { title: "扫描行驶证", showFooter: false ,keepAlive:false} },
  
  { path: "/userinfo", name: 'userinfo', component: () => import('../components/userinfo.vue'), meta: { title: "申请", showFooter: false ,keepAlive:true} },
  { path: "/getinfo", name: 'Getinfo', component: () => import('../components/getinfo.vue'), meta: { title: "获取授权", showFooter: false ,keepAlive:false} },
  { path: "/agreement", name: 'Agreement', component: () => import('../views/agreement.vue'), meta: { title: "协议", showFooter: false ,keepAlive:false} },
  { path: "/useragreement", name: 'Useragreement', component: () => import('../components/useragreement.vue'), meta: { title: "", showFooter: false ,keepAlive:false} },
  { path: "/recommend", name: 'Recommend', component: () => import('../components/recommend.vue'), meta: { title: "二维码推荐", showFooter: false ,keepAlive:false} },
  { path: "/login", name: 'login', component: () => import('../components/login.vue'), meta: { title: "登录", showFooter: false ,keepAlive:false} }
]

const router = new VueRouter({
  // mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router
